<template>
	<view>
		<view class="addr-item" @click="toPage('/pages/addr/detail')">
			<view class="info">
				<view class="left">
					<h1>老王</h1>
					<text class="df-tag">默认地址</text>
					<p>深圳宝安区123123213</p>
				</view>
				<view class="right">
					<uni-icons type="compose" size="30" color="#aaaaaf"></uni-icons>
				</view>
			</view>
		</view>
		<view class="btn" @click="toPage('/pages/addr/add')">+添加地址</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			toPage(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>
<style>
	page {
		background-color: #f2f2f2;
	}
</style>

<style scoped lang="less">
	.btn{
		font-size: 20px;
		width: 90%;
		background-color: #f9bf36;
		color: #fff;
		border-radius: 10rpx;
		text-align: center;
		line-height: 100rpx;
		height: 100rpx;
		position: absolute;
		left: 5%;
		bottom: 5%;
	}
	.addr-item {
		margin: 20rpx 0rpx;
		background-color: #fff;

		.info {
			padding: 30rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.left {
				p {
					font-size: 16px;
					color: #8b8b8b;
					margin: 10rpx 0rpx;
				}

				.df-tag {

					font-size: 12px;
					background-color: #fff4e5;
					color: #ffcd89;
					padding: 5rpx 10rpx 5rpx 10rpx;
				}

				h1 {
					font-size: 18px;
					font-weight: bold;
				}
			}
		}
	}
</style>